/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.datamonitor.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.datamonitor.entity.MonitorPolice;
import com.jeeplus.modules.datamonitor.mapper.MonitorPoliceMapper;

/**
 * 设备检测报警Service
 * @author 刘明星
 * @version 2020-12-11
 */
@Service
@Transactional(readOnly = true)
public class MonitorPoliceService extends TreeService<MonitorPoliceMapper, MonitorPolice> {

	public MonitorPolice get(String id) {
		return super.get(id);
	}
	
	public List<MonitorPolice> findList(MonitorPolice monitorPolice) {
		if (StringUtils.isNotBlank(monitorPolice.getParentIds())){
			monitorPolice.setParentIds(","+monitorPolice.getParentIds()+",");
		}
		return super.findList(monitorPolice);
	}
	
	@Transactional(readOnly = false)
	public void save(MonitorPolice monitorPolice) {
		super.save(monitorPolice);
	}
	
	@Transactional(readOnly = false)
	public void delete(MonitorPolice monitorPolice) {
		super.delete(monitorPolice);
	}
	
}